<?phpnamespace app\admin\controller\finance;use service\JsonService;use app\common\model as M;class CouponRecords extends \app\admin\controller\AuthController{    use \traits\ShotcutControllerTrait;    public $model = '\app\common\model\CouponRecords';    /**     * 核销优惠券     * @Author   FW     * @DateTime 2024-05-30     * @Email    123763712@qq.com     * @return   [type]           [description]     */    public function verifyCoupon()    {        $recId = (int)input('recId');        if ( $recId > 0 ) {            try {                $res = M\CouponRecords::verify($recId , $use_type = 3);                if ( $res !== true ) throw new \Exception('核销失败');                return JsonService::successful();            } catch (\Exception $e) {                return JsonService::fail($e->getMessage());            }        }        return JsonService::fail('操作失败');    }} //Class End